package net.xiduth.events.button;

import net.xiduth.events.ButtonEvent;
import net.xiduth.events.EventManager;
import net.xiduth.game.player.Player;

/**
 * This class handles the clicking of the grand exchange buttons.
 * 
 * @author Tyluur <itstyluur@gmail.com>
 * @since 2012-08-17
 */
public class GrandExchangeEvent implements ButtonEvent {

	@Override
	public boolean init() {
		EventManager.register(107, this);
		EventManager.register(389, this);
		return EventManager.register(105, this);
	}

	@Override
	public boolean handle(Player player, int interfaceId, int buttonId,
			int packetId, int slotId, int slotId2) {
		player.getGrandExchange().handleButtonEvent(interfaceId, buttonId, packetId, slotId, slotId2);
		return true;
	}

}
